package com.woniu108.product.client;

import com.woniu108.carService.commons.log.AdminHistoryLog;
import com.woniu108.carService.commos.model.Result;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author 谭鹏
 */
@FeignClient(name = "evaluate-server",path = "/evaluate")
public interface EvaluateClient {

    /**
     * 创建商品的评分信息
     * @param pItemId 商品编号
     * @return boolean值
     */
    @GetMapping("/productScore/createProductScoreByPItemId/{pItemId}.api")
    @ApiOperation("创建商品的评分信息")
     Result<Boolean> createProductScoreByPItemId(@PathVariable("pItemId") Integer pItemId);

    /**
     * 商品删除时，删除其评价信息
     * @param pItemId 商品id
     * @return 布尔值
     */
    @GetMapping("/productScore/delProductScore/{pItemId}.api")
    @ApiOperation("商品删除时，删除其评价信息")
    @AdminHistoryLog
     Result<Boolean> delProductScore(@PathVariable("pItemId")Integer pItemId);


    }
